package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.pojo.OperateLogParam;
import org.example.pojo.PageResult;
import org.example.pojo.Result;
import org.example.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LogController {
    @Autowired
    private ReportService reportService;
    /**
     * 日志列表查询
     * @return
     */
    @GetMapping("/log/page")
    public Result logPage(OperateLogParam operateLogParam){
        log.info("日志列表查询,operateLogParam={}", operateLogParam);
        PageResult pageResult = reportService.logPage(operateLogParam);
        return Result.success(pageResult);
    }
}
